package com.xigua._树;

import com.xigua.TreeNode;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/2/1117:23
 */
public class _104_二叉树的最大深度 {


    public int maxDepth(TreeNode root) {
        if (root == null) return  0;
        int leftHigh = maxDepth(root.left);
        int rightHigh = maxDepth(root.right);
        return Math.max(leftHigh,rightHigh)+1;
    }



}
